<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/PhyToMacControlInfo.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00301.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">PhyToMacControlInfo.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef PHYTOMACCONTROLINFO_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define PHYTOMACCONTROLINFO_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;omnetpp.h&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;MiXiMDefs.h&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;Decider.h&quot;</span>
<a name="l00008"></a>00008 
<a name="l00017"></a><a class="code" href="a00177.html">00017</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a>: <span class="keyword">public</span> cObject {
<a name="l00018"></a>00018 <span class="keyword">protected</span>:
<a name="l00020"></a><a class="code" href="a00177.html#a1dc106d6290a2f4f18b4281e14077545">00020</a>   <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a> * <a class="code" href="a00177.html#a1dc106d6290a2f4f18b4281e14077545">result</a>;
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="keyword">private</span>:
<a name="l00025"></a>00025   <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a>(<span class="keyword">const</span> <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a>&amp;);
<a name="l00028"></a>00028   <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a>&amp;);
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">public</span>:
<a name="l00036"></a><a class="code" href="a00177.html#a8e9300c49e9f955c4b5333da109143d4">00036</a>   <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a>(<a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>* result):
<a name="l00037"></a>00037     result(result) {}
<a name="l00038"></a>00038 
<a name="l00042"></a><a class="code" href="a00177.html#a5b56a9f0cf2b87496f6d19df98216bf5">00042</a>   <span class="keyword">virtual</span> <a class="code" href="a00177.html#a5b56a9f0cf2b87496f6d19df98216bf5" title="Clean up the DeciderResult.">~PhyToMacControlInfo</a>() {
<a name="l00043"></a>00043     <span class="keywordflow">if</span>(result)
<a name="l00044"></a>00044       <span class="keyword">delete</span> result;
<a name="l00045"></a>00045   }
<a name="l00046"></a>00046 
<a name="l00050"></a><a class="code" href="a00177.html#a695fcb4091796018a3315486acafc9b0">00050</a>   <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>* <a class="code" href="a00177.html#a695fcb4091796018a3315486acafc9b0" title="Returns the result of the evaluation of the Decider.">getDeciderResult</a>()<span class="keyword"> const </span>{
<a name="l00051"></a>00051     <span class="keywordflow">return</span> result;
<a name="l00052"></a>00052   }
<a name="l00053"></a>00053 
<a name="l00067"></a><a class="code" href="a00177.html#a7d5a61c8f8a55edd3ea9e7d8195543ef">00067</a>     <span class="keyword">static</span> cObject* <a class="code" href="a00177.html#a7d5a61c8f8a55edd3ea9e7d8195543ef" title="Attaches a &quot;control info&quot; structure (object) to the message pMsg.">setControlInfo</a>(cMessage *<span class="keyword">const</span> pMsg, <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a> *<span class="keyword">const</span> pDeciderResult) {
<a name="l00068"></a>00068       <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a> *<span class="keyword">const</span> cCtrlInfo = <span class="keyword">new</span> <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a>(pDeciderResult);
<a name="l00069"></a>00069       pMsg-&gt;setControlInfo(cCtrlInfo);
<a name="l00070"></a>00070 
<a name="l00071"></a>00071       <span class="keywordflow">return</span> cCtrlInfo;
<a name="l00072"></a>00072     }
<a name="l00076"></a><a class="code" href="a00177.html#a8f35582c0a725032bd6ad7bae3d73367">00076</a>     <span class="keyword">static</span> <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>* <a class="code" href="a00177.html#a8f35582c0a725032bd6ad7bae3d73367" title="extracts the decider result from message &quot;control info&quot;.">getDeciderResult</a>(cMessage *<span class="keyword">const</span> pMsg) {
<a name="l00077"></a>00077       <span class="keywordflow">return</span> getDeciderResultFromControlInfo(pMsg-&gt;getControlInfo());
<a name="l00078"></a>00078     }
<a name="l00082"></a><a class="code" href="a00177.html#a0da48a989110f23b214f0fd8a2952333">00082</a>     <span class="keyword">static</span> <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>* <a class="code" href="a00177.html#a0da48a989110f23b214f0fd8a2952333" title="extracts the decider result from message &quot;control info&quot;.">getDeciderResultFromControlInfo</a>(cObject *<span class="keyword">const</span> pCtrlInfo) {
<a name="l00083"></a>00083       <a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a> *<span class="keyword">const</span> cCtrlInfo = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="a00177.html" title="Controlinfo for packets which are send from Physical layer to the MAC layer.">PhyToMacControlInfo</a> *const<span class="keyword">&gt;</span>(pCtrlInfo);
<a name="l00084"></a>00084 
<a name="l00085"></a>00085       <span class="keywordflow">if</span> (cCtrlInfo)
<a name="l00086"></a>00086         <span class="keywordflow">return</span> cCtrlInfo-&gt;<a class="code" href="a00177.html#a695fcb4091796018a3315486acafc9b0" title="Returns the result of the evaluation of the Decider.">getDeciderResult</a>();
<a name="l00087"></a>00087       <span class="keywordflow">return</span> NULL;
<a name="l00088"></a>00088     }
<a name="l00089"></a>00089 };
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="preprocessor">#endif </span><span class="comment">/*PHYTOMACCONTROLINFO_H_*/</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>PhyToMacControlInfo.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:30 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
